//
//  QueryResultCell.m
//  CarLife
//
//  Created by yu on 2017/11/1.
//  Copyright © 2017年 jpas. All rights reserved.
//

#import "QueryResultCell.h"

@implementation QueryResultCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setModel:(QueryResultModel *)model
{
    _model = model;
    PPLog(@"act = %@",model.act);
    self.dateLabel.text = _model.date;
    self.actLabel.text = _model.act;
    self.areaLabel.text = _model.area;
    
    if ([_model.handled isEqualToString:@"0"]) {
        [self.handledLabel setTitle:@"未处理" forState:UIControlStateNormal];
    } else {
        [self.handledLabel setTitle:@"已处理" forState:UIControlStateNormal];
    }
    
    if ([_model.money isEqualToString:@"0"]) {
        [self.moneyLabel setTitle:@"无" forState:UIControlStateNormal];
    } else {
        [self.moneyLabel setTitle:NSStringFormat(@"罚款%@",_model.money) forState:UIControlStateNormal];
    }

    
    if ([_model.fen isEqualToString:@"0"]) {
        [self.pointLabel setTitle:@"无" forState:UIControlStateNormal];
    } else {
        [self.pointLabel setTitle:NSStringFormat(@"扣%@分",_model.fen) forState:UIControlStateNormal];
    }

}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
